import { GameInitInfo } from "../CommonValue";
import { Global } from "../Global";

const NetSender = {
    Send(data: any) {
        console.error(data);
        Global.Inst().room.sendToServer(JSON.stringify(data));
    },
    //初始化房间
    SendInitRoom() {
        let data: GameInitInfo = {
            type: 'InitGame',
            playerArr: []
        }
        this.Send(data)
    },

    SendStartRoom() {
        let data = {
            type: 'StartGame',
        }
        this.Send(data)
    },

    SendSlickBox(id: number) {
        let data = {
            type: 'SlickBox',
            coinIndex: id
        }
        this.Send(data)
    },

}

export default NetSender;